//
//  UIView+Frame.m
//  BaiSiBuDeJie
//
//  Created by 胡锦涛 on 2018/11/30.
//  Copyright © 2018 胡锦涛. All rights reserved.
//

#import "UIView+Frame.h"

@implementation UIView (Frame)
- (void)setHk_height:(CGFloat)hk_height {
    CGRect rect = self.frame;
    rect.size.height = hk_height;
    self.frame = rect;
}

- (CGFloat)hk_height
{
    return self.frame.size.height;
}

- (CGFloat)hk_width
{
    return self.frame.size.width;
}

-(void)setHk_width:(CGFloat)hk_width {
    CGRect rect = self.frame;
    rect.size.width = hk_width;
    self.frame = rect;
}

-(CGFloat)hk_x
{
    return self.frame.origin.x;
}

-(void)setHk_x:(CGFloat)hk_x
{
    CGRect rect = self.frame;
    rect.origin.x = hk_x;
    self.frame = rect;
}

-(void)setHk_y:(CGFloat)hk_y
{
    CGRect rect = self.frame;
    rect.origin.y = hk_y;
    self.frame = rect;
}

-(CGFloat)hk_y
{
    
    return self.frame.origin.y;
}
@end
